<!DOCTYPE html>
<html>
<head lang="kr">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
    <title>9.8 [Map chart] taiwan map</title>
    <link rel="stylesheet" type="text/css" href="../dist/tui-chart.css" />

    <link rel='stylesheet' type='text/css' href='../node_modules/codemirror/lib/codemirror.css'/>
    <link rel='stylesheet' type='text/css' href='../node_modules/codemirror/addon/lint/lint.css'/>
    <link rel='stylesheet' type='text/css' href='./css/example.css'/>
</head>
<body>
<div class='wrap'>
    <div class='code-html' id='code-html'>
        <div id='chart-area'></div>
    </div>
</div>
<div class='custom-area'>
    <div id='error-dim'>
        <span id='error-text'></span>
        <div id='error-stack'></div>
        <span id='go-to-dev-tool'>For more detail, open browser's developer tool and check it out.</span>
    </div>
    <div style='border: 0.2px solid #aaa;'>
        <textarea id='code'></textarea>
    </div>

    <div class='apply-btn-area' style='width: 600px;'>
        <button class="btn" style='position: absolute; right: 0px;' onclick='evaluationCode(chartCM, codeString);'>Run it!
        </button>
        <button class="btn" onclick="window.open('https://github.com/nhnent/tui.chart/wiki/theme')">More Theme
        </button>
    </div>
</div>
<!--Import chart.js and dependencies-->
<script type='text/javascript' src='https://rawgit.com/nhnent/tui.code-snippet/v1.3.0/dist/tui-code-snippet.js'></script>
<script type='text/javascript' src='https://rawgit.com/nhnent/raphael/v2.2.0b/raphael.js'></script>
<script src='../dist/tui-chart.js'></script>
<script src='../dist/maps/taiwan.js'></script>
<script class='code-js' id='code-js'>
var container = document.getElementById('chart-area');
var data = {
    series: [
        {
            "code": "TW-LCG",
            "data": 13
        },
        {
            "code": "TW-KNM",
            "data": 128
        },
        {
            "code": "TW-PEN",
            "data": 102
        },
        {
            "code": "TW-TTT",
            "data": 224
        },
        {
            "code": "TW-YUN",
            "data": 705
        },
        {
            "code": "TW-NAN",
            "data": 514
        },
        {
            "code": "TW-HUA",
            "data": 333
        },
        {
            "code": "TW-CYQ",
            "data": 525
        },
        {
            "code": "TW-CHA",
            "data": 1291
        },
        {
            "code": "TW-MIA",
            "data": 567
        },
        {
            "code": "TW-ILA",
            "data": 458
        },
        {
            "code": "TW-HSZ",
            "data": 538
        },
        {
            "code": "TW-PIF",
            "data": 847
        }
    ]
};
var options = {
    chart: {
        width: 500,
        height: 770,
        title: 'Population of Taiwan (thousand person)',
        format: '1,000'
    },
    map: 'taiwan',
    legend: {
        align: 'right'
    }
};
var theme = {
    series: {
        startColor: '#ffefef',
        endColor: '#ac4142',
        overColor: '#75b5aa'
    }
};

// For apply theme

// tui.chart.registerTheme('myTheme', theme);
// options.theme = 'myTheme';

tui.chart.mapChart(container, data, options);
</script>
<!--For tutorial page-->
<script src='../node_modules/codemirror/lib/codemirror.js'></script>
<script src='//ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js'></script>
<script src='../node_modules/codemirror/addon/edit/matchbrackets.js'></script>
<script src='../node_modules/codemirror/addon/selection/active-line.js'></script>
<script src='../node_modules/codemirror/mode/javascript/javascript.js'></script>
<script src='../node_modules/codemirror/addon/lint/lint.js'></script>
<script src='../node_modules/codemirror/addon/lint/javascript-lint.js'></script>
<script src='./js/example.js'></script>

</body>
</html>
